﻿using System.Collections.Generic;
using System.Linq;

namespace BabyShop.Site.Exts.Extensions
{
    internal static class InExtensions
    {
        public static bool In<T>(this T t, params T[] c) {
            return c.Any(i => i.Equals(t));
        }
        public static bool In<T>(this T t, IEnumerable<T> c) {
            return c.Any(i => i.Equals(t));
        }

        public static bool NotIn<T>(this T t, params T[] c) {
            return c.All(i => !i.Equals(t));
        }
        public static bool NotIn<T>(this T t, IEnumerable<T> c) {
            return c.All(i => !i.Equals(t));
        }
    }
}